package com.gzc.just.play.last.war.common.share.communication;

/**
 * Server message
 */
public class ServerMessage {
    
    private String id;
    private String type;
    private Object data;
    private String source;
    private String target;
    private long timestamp;
    private boolean expectResponse = true;
    private int priority = 5; // 1-10, 1 is highest
    private int retryCount = 0;
    private int maxRetries = 3;
    
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getType() {
        return type;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    public Object getData() {
        return data;
    }
    
    public void setData(Object data) {
        this.data = data;
    }
    
    public String getSource() {
        return source;
    }
    
    public void setSource(String source) {
        this.source = source;
    }
    
    public String getTarget() {
        return target;
    }
    
    public void setTarget(String target) {
        this.target = target;
    }
    
    public long getTimestamp() {
        return timestamp;
    }
    
    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
    
    public boolean isExpectResponse() {
        return expectResponse;
    }
    
    public void setExpectResponse(boolean expectResponse) {
        this.expectResponse = expectResponse;
    }
    
    public int getPriority() {
        return priority;
    }
    
    public void setPriority(int priority) {
        this.priority = priority;
    }
    
    public int getRetryCount() {
        return retryCount;
    }
    
    public void setRetryCount(int retryCount) {
        this.retryCount = retryCount;
    }
    
    public int getMaxRetries() {
        return maxRetries;
    }
    
    public void setMaxRetries(int maxRetries) {
        this.maxRetries = maxRetries;
    }
}